import axiosData from "@/api/axios";
export default {
  /**
   * @description: 获取备件管理 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {componyId: 1} *
   * @return {Array}
   */
  queryPageList(params) {
    return axiosData.post("/v3/agricultural-equipment/v1/sparePart/queryPageList", params);
  },

  /**
   * @description: 新增备件管理
   * @param {String} sparePartName *
   * @param {String} sparePartTypeCode *
   * @param {String} specifications *
   * @param {String} equModelCode *
   * @param {String} organizationMark *
   * @param {Number} unitId *
   * @return {Object}
   */
  add(params) {
    return axiosData.post("/v3/agricultural-equipment/v1/sparePart/add", params);
  },
  /**
   * @description: 编辑备件管理
   * @param {Number} sparePartId *
   * @param {String} sparePartName *
   * @param {String} sparePartTypeCode *
   * @param {String} specifications *
   * @param {String} equModelCode *
   * @param {String} organizationMark *
   * @param {Number} unitId *
   * @return {Object}
   */
  edit(params) {
    return axiosData.post("/v3/agricultural-equipment/v1/sparePart/edit", params);
  },
  /**
   * @description: 批量删除备件管理
   * @param {Object} sparePartCodeList *
   * @return {Object}
   */
  delList(params) {
    return axiosData.post("/v3/agricultural-equipment/v1/sparePart/deleteBySparePartCodeList", params);
  }
};
